home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ For TASM / THUNK95.PAK / MAKEFILE < prev    next >
Text File  |  1996-02-21  |  3KB  |  126 lines

  1. ##########################################################################
  2. # Make file for Turbo Assembler Thunk95 sample project.
  3. #   Copyright (c) 1996 by Borland International, All Rights Reserved
  4. #
  5. #       make -B                 Will build App32.exe and all components
  6. #       make -B -DDEBUG         Will build the debug version of App32.exe
  7. #
  8. ##########################################################################
  9. #
  10. # Data alignment is forced to 4-bytes in 32-bit code and 2-bytes in
  11. # 16-bit code to take on the defaults of the thunk compiler. By
  12. # default, the Borland compilers use byte alignment and the thunk
  13. # compiler can be made to comply using the -p and -P switches to set
  14. # 16-bit and 32-bit alignment respectively.
  15. #
  16. ##########################################################################
  17. .autodepend
  18.  
  19. CCOPT=-w+ -DSTRICT
  20. ASMOPT16=/utthk /DIS_16
  21. ASMOPT32=/utthk /DIS_32 /ml
  22.  
  23. !if $d(DEBUG)
  24.  ASMDBG=/zi
  25.  CCDBG=/v
  26.  LNKDBG=/v /s
  27. !else
  28.  ASMDBG=
  29.  CCDBG=
  30.  LNKDBG=
  31. !endif
  32.  
  33. #-------------- Governing rule
  34. all: app32.exe dll16.dll
  35.  
  36. #-------------- 32-bit executable target
  37. app32.exe: dll32.lib app32.obj app32.res
  38.    tlink32 $(LNKDBG) -Tpe -aa -V4.0 -c @&&|
  39. c0w32.obj+
  40. app32.obj
  41. app32.exe
  42. app32.map
  43. dll32.lib+
  44. import32.lib+
  45. cw32i.lib
  46.    # no DEF file
  47. app32.res
  48. |
  49.  
  50. app32.obj: app32.cpp
  51.    bcc32 $(CCOPT) $(CCDBG) -c -tW -a4 $**
  52.  
  53. app32.res: app32.rc
  54.    brc32 -r -foapp32.res app32.rc
  55.  
  56. #-------------- 32-bit DLL target
  57. dll32.lib: dll32.dll
  58.    implib dll32.lib dll32.dll
  59.  
  60. dll32.dll: dll32.obj ThkObj32.obj dll32.def
  61.    tlink32 $(LNKDBG) -Tpd -aa -V4.0 -c @&&|
  62. c0d32.obj+
  63. dll32.obj+
  64. ThkObj32.obj
  65. dll32.dll
  66. dll32.map
  67. import32.lib+
  68. cw32i.lib
  69. dll32.def
  70. |
  71.  
  72. dll32.obj: dll32.cpp
  73.    bcc32 -c $(CCOPT) $(CCDBG) -tWD -a4 dll32.cpp
  74.  
  75. ThkObj32.obj: ThunkObj.asm
  76.    tasm32 $(ASMOPT32) $(ASMDBG) ThunkObj.asm, ThkObj32.obj, ThkObj32.lst
  77.  
  78. #-------------- 16-bit DLL target
  79. dll16.dll: dll16.obj ThkObj16.obj tools.obj dll16.def
  80.    tlink -Twd -c -C -V4.0 $(LNKDBG) @&&|
  81. c0dl.obj+
  82. dll16.obj+
  83. thkobj16.obj+
  84. tools.obj
  85. dll16.dll
  86. dll16.map
  87. import.lib+
  88. crtldll.lib
  89. dll16.def
  90. |
  91.  
  92. dll16.obj: dll16.cpp
  93.    bcc -c $(CCOPT) $(CCDBG) -tWD -ml dll16.cpp
  94.  
  95. #
  96. # Tasm32 will only generate 32-bit debug information, so you cannot
  97. # generate debug info in the 16-bit thunk module.
  98. #
  99. ThkObj16.obj: ThunkObj.asm
  100.    tasm32 $(ASMOPT16) ThunkObj.asm, ThkObj16.obj, ThkObj16.lst
  101.  
  102. tools.obj: tools.cpp
  103.    bcc -c $(CCOPT) $(CCDBG) -tWD -ml tools.cpp
  104.  
  105. #-------------- Shared thunk object
  106. #
  107. #  Note: byte alignment settings are default values for the thunk
  108. # compiler.
  109. #
  110. ThunkObj.asm: ThunkObj.thk
  111.    thunk /p2 /P4 ThunkObj.thk
  112.  
  113. #-------------- Cleanup
  114. Clean:
  115.    if exist *.obj del *.obj
  116.    if exist *.lst del *.lst
  117.    if exist *.res del *.res
  118.    if exist *.map del *.map
  119.    if exist *.tr2 del *.tr2
  120.    if exist *.td2 del *.td2
  121.    if exist dll16.dll del dll16.dll
  122.    if exist dll32.dll del dll32.dll
  123.    if exist dll32.lib del dll32.lib
  124.    if exist app32.exe del app32.exe
  125.    if exist thunkobj.asm del thunkobj.asm
  126.